#ifndef MYSOCKET_H
#define MYSOCKET_H
#include<QTcpSocket>
#include<QHostAddress>
#include<QDebug>
#include <QMainWindow>

#include "mainwindow.h"
class Mysocket : public QTcpSocket
{
    Q_OBJECT
public:
    explicit Mysocket(qintptr p_sock,QObject *parent = Q_NULLPTR);
    ~Mysocket();

signals:
    void dataReady(char *argv);
public:
    //转发功能
    //服务器界面接收客户端传来的数据并显示，然后将接收到的数据添加上适当的信息后转发给客户端
    void forwordData();
public slots:
    void onDiscon();
    void onRead();
    void onReadUser();
};

#endif // MYSOCKET_H
